package com.heima.admin.controller;

import com.heima.admin.service.AdminChannelService;
import com.heima.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/v1/channel")
@Api("获取频道列表")
@Slf4j
public class AdminChannelController {
    @Autowired
    private AdminChannelService adminChannelService;

    /**
     * 获取频道列表
     *
     * @return
     */
    @GetMapping("/channels")
    @ApiOperation("获取频道列表")
    public ResponseResult getChannel() {

        return adminChannelService.getChannel();
    }
}
